<script setup>
import {RouterLink,RouterView } from "vue-router";

import { ref } from 'vue';

const id = ref('123'); // 动态参数


</script>
<template>
    <RouterLink :to="{name:'Happy'}">我是谁</RouterLink>
    <RouterLink :to="{name:'HellowBaby'}">你无敌了</RouterLink>
    <RouterLink :to="{name:'Baby',params:{id:id}}"> 给我发力</RouterLink>

    <RouterView></RouterView>
</template>